import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use (VueRouter)
const {  name  } = require('../package.json')
let preFix = '/'
if(window.__POWERED_BY_QIANKUN__){
    preFix='/micrApp/'+name+'/'
}
const routes = [
    {
        path: '/',
        name: 'home',
        component: () => import('views/Main.vue'),
        meta: {title: '系统'},
        children: [
            {
                path:preFix+'userInfo',
                name: 'userInfo',
                title: '系统用户管理',
                key: '0',
                component: () => import('src/views/system/userInfo'),
                meta: {
                    title: ',',
                    key: '0',
                },
                children: []
            },
            {
                path:preFix+'sysOrg',
                name: 'sysOrg',
                title: '组织机构管理',
                key: '1',
                component: () => import('src/views/system/sysOrg'),
                meta: {
                    title: ',',
                    key: '1',
                },
                children: []
            },
            {
                path:preFix+'sysRole',
                name: 'sysRole',
                title: '系统角色管理',
                key: '2',
                component: () => import('src/views/system/sysRole'),
                meta: {
                    title: ',',
                    key: '2',
                },
                children: []
            },
            {
                path:preFix+'sysResource',
                name: 'sysResource',
                title: '系统资源管理',
                key: '3',
                component: () => import('src/views/system/sysResource'),
                meta: {
                    title: ',',
                    key: '3',
                },
                children: []
            },
            {
                path:preFix+'userAuth',
                name: 'userAuth',
                title: '用户权限管理',
                key: '4',
                component: () => import('src/views/system/userInfo/userAuth'),
                meta: {
                    title: ',',
                    key: '4',
                },
                children: []
            },
            {
                path:preFix+'roleAuth',
                name: 'roleAuth',
                title: '角色权限管理',
                key: '5',
                component: () => import('src/views/system/sysRole/roleAuth'),
                meta: {
                    title: ',',
                    key: '5',
                },
                children: []
            },{
                path:preFix+'serverManage',
                name: 'serverManage',
                title: '微服务管理',
                key: '6',
                component: () => import('src/views/system/sysServer'),
                meta: {
                    title: ',',
                    key: '6',
                },
                children: []
            },
        ]
    },
]
export default routes
